docs: add durable example - #253
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #253 +/- ##
=======================================
Coverage 90.14% 90.14%
=======================================
Files 20 20
Lines 1207 1207
Branches 188 188
=======================================
Hits 1088 1088
Misses 42 42
Partials 77 77 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jansimonb
requested changes
Aug 4, 2025
jansimonb
left a comment
Contributor
There was a problem hiding this comment.
Nice work, just few comments.
…influxdb3-java into example/durable-example
Contributor
Author
|
I've made some recommended changes. I've also expanded explanations in comments. Since I ran across a flaky test failure in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Adds an example showing how to reuse and keep alive client instances for the duration of an application, as recommended in GRPC Best Practices. Clients should be created or recreated as little as possible and should be reused as much as possible.
The example illustrates using a primitive client pool that manages client instances while running four threads simultaneously handling influxdb calls. Two of these threads produce error responses from the server. Clients recover from these errors and can still be used for other calls.
This was motivated by research into a customer question about using connection pools for the query transport. Connection pools are already handled by the underlying GRPC ManagedChannel, which is designed to be long-running and robust. The write transport is similarly designed to recover from typical error responses.
Checklist